﻿using MediatR;
using System.WXT.Domain;
using System.WXT.Infrstructre.Interface;
using System.WXT.WebAPI.Application.Command.productionPickingCommand;

namespace System.WXT.WebAPI.Application.CommandHandlers.productionPickingCommandHandlers
{
    public class productionPickingBackfillCommandHandlers:IRequestHandler<productionPickingBackfillCommand, productionPicking>
    {
        protected readonly IproductionPickingRepository iproductionPickingRepository;

        public productionPickingBackfillCommandHandlers(IproductionPickingRepository iproductionPickingRepository)
        {
            this.iproductionPickingRepository = iproductionPickingRepository;
        }
        /// <summary>
        /// 生产原料反填
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        public async Task<productionPicking> Handle(productionPickingBackfillCommand request, CancellationToken cancellationToken)
        {
            var list = await iproductionPickingRepository.GetBaby(request.productionPickingId);
            return list;
        }
    }
}
